{% for img in imgs %}
<img src="{{ img.img.url }}" />
{% endfor %}
<button onclick="deleteAllImg()" type="button">删除</button>
<script>
    function deleteAllImg()
    {
        req = new XMLHttpRequest();
        req.open("GET","/delete");
        req.send();
        alert('删除完毕!')
        window.location.reload();
    }
</script>